<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateStorePivotCustomerProductTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('store_pivot_customer_product', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('store_id')->default(0);
			$table->integer('product_id')->default(0)->comment('客户的商品id');
			$table->integer('priority')->default(0)->comment('优先级');
			$table->boolean('is_deleted')->default(0)->comment('上下架 （要删除的）');
			$table->boolean('is_sale')->default(0)->comment('是否上架，0：未上架，1：上架');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('store_pivot_customer_product');
	}

}
